﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;

namespace DiagramDesigner
{
    class TestData : IDataService
    {
        public DataModel GetModel()
        {
            DataModel dm = new DataModel();
            dm.SubItems.Add(MakeSubItem());
            dm.SubItems.Add(MakeSubItem());
            return dm;
        }

        private DataSubItemModel MakeSubItem()
        {
            DataSubItemModel model = new DataSubItemModel();
            
            PointCollection pc = new PointCollection();
            pc.Add(new Point(10, 20));
            pc.Add(new Point(40, 20));
            pc.Add(new Point(70, 30));

            model.SubItemCollection.Add(pc);

            pc = new PointCollection();
            pc.Add(new Point(20, 50));
            pc.Add(new Point(40, 60));
            pc.Add(new Point(60, 90));
            
            model.SubItemCollection.Add(pc);

            model.AngleLineLeft = new LineModel()
            {
                Pt1 = new Point(50, 200.5),
                Pt2 = new Point(100, 20.5)
            };

            model.Substrate = new LineModel()
            {
                Pt1 = new Point(100, 100),
                Pt2 = new Point(400, 100)
            };

            return model;
        }
    }
}
